package com.axjy.service.impl;

import com.axjy.dao.UserDao;
import com.axjy.pojo.User;
import com.axjy.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("userService")
@Transactional
public class UserServiceImpl implements UserService{

    @Resource
    private UserDao userDao;

    @Override
    public User login(String name, String password) {
        return userDao.findByNameAndPassword(name,password);
    }
}
